<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/layui.css">
    <link rel="stylesheet" href="/css/teac01.css">
    <script src="/js/jquery-3.7.1.min.js"></script>
</head>
<body>
    <!--使用ajax显示数据-->
    <div class="container">
        <div class="layui-row">
            <div class="layui-col-xs12">
                <h1 style="text-align: center">教师信息管理</h1>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-xs12 toolbar">
                <button type="button" class="layui-btn layui-btn-normal"
                        onclick="showTeacherDlg();return false;">
                    <i class="layui-icon layui-icon-addition" style="font-size: 30px; color: white;"></i>
                </button>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-xs12">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>teacher_id</th>
                        <th>tname</th>
                        <th>tage</th>
                        <th>编辑</th>
                        <th>删除</th>
                    </tr>
                    </thead>
                    <tbody id="teacherTb">

                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <form class="layui-form dlgcontainer" id="teacForm" style="display: none">
        <div class="demo-reg-container">
            <div class="layui-form-item" id="formId">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-username"></i>
                    </div>
                    <input type="text" name="id" value="" placeholder="id" autocomplete="off" class="layui-input" id="id" lay-affix="clear">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-username"></i>
                    </div>
                    <input type="text" name="teacher_id" value="" lay-verify="required" placeholder="学号" autocomplete="off" class="layui-input" id="teacher_id" lay-affix="clear">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-username"></i>
                    </div>
                    <input type="text" name="tname" value="" lay-verify="required" placeholder="姓名" autocomplete="off" class="layui-input" id="tname" lay-affix="clear">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-username"></i>
                    </div>
                    <input type="text" name="tage" value="" placeholder="年龄" autocomplete="off" class="layui-input" id="tage" lay-affix="clear">
                </div>
            </div>
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-fluid" id="btnOK" lay-submit lay-filter="teac-dlg">确定</button>
            </div>
        </div>
    </form>
    <script src="/js/layui.js"></script>
    <script src="/pagejs/teac01.js"></script>
</body>
</html>